#include "ObjectCar.h"
#include "Global.h"

namespace RisingStar
{

	CObjectCar::CObjectCar(TObjectProperty objPropert):CObject(objPropert)
	{		
		Init();
	}
	
	CObjectCar::CObjectCar()
	{
		Init();
	}
	
	CObjectCar::~CObjectCar()
	{

		
	}
	
	CObject::ObjectPtr CObjectCar::Copy()
	{
		//cout<<"CObjectCar Copy"<<endl;
		
		ObjectPtr pUser(new CObjectCar(mObjectProperty));
		*pUser = (*this);

		return pUser;
	}
	
	bool CObjectCar::Init()
	{
		nValues["对象类型"] = "汽车";
		nValues["数据库类型"] = "手机";
		sGlobal.RequestCallbackMap["汽车注册"] = CObjectCar::ObjectCallbackUserRegister;
		sGlobal.RequestCallbackMap["汽车资料修改"] = CObjectCar::ObjectCallbackUserEdit;
		sGlobal.RequestCallbackMap["汽车删除"] = CObjectCar::ObjectCallbackUserDel;
		return true;
	}
	
	bool CObjectCar::ObjectCallbackUserRegister(CObject* obj)
	{
		cout<<"汽车注册函数调用成功"<<endl;
		return true;
	}
	bool CObjectCar::ObjectCallbackUserEdit(CObject* obj)
	{
		//cout<<"汽车修改函数调用成功"<<endl;
		ObjectCallbackSqlEdit(obj);
		return true;
	}
	
	bool CObjectCar::ObjectCallbackUserDel(CObject* obj)
	{
		ObjectCallbackSqlDel(obj);

		return true;
	}
	
	
	
	bool CObjectCar::ObjectCallbackUserPasswordResetAndLogin(CObject* obj)
	{
		
		ObjectCallbackSqlAddOrEdit(obj);
		
		
		
		cout<<"密码重置并登录"<<endl;
		return true;
	}
	
	bool CObjectCar::ObjectCallbackUserPasswordLogin(CObject* obj)
	{
		
		
		cout<<"密码登录"<<endl;
		return true;
	}
	
	bool CObjectCar::ObjectCallbackUserIdentifyingCodeSend(CObject* obj)
	{
		cout<<"汽车验证码发送"<<endl;
		return true;
	}
	
	
	
}

